from django.urls import path
from django.conf.urls import url
from . import views

app_name = 'pc'

urlpatterns = [
    path('register/', views.RegisterAPIView.as_view(), name='register'),
    path('resetPwd/', views.ResetPWDAPIView.as_view(), name='reset'),
    path('login/', views.LoginAPIView.as_view(), name='Login'),
    path('logout/', views.LogoutAPIView.as_view(), name='Logout'),
    path('save/', views.SaveTradeAPIView.as_view(), name='pc_save'),
    url(r'del/(?P<pk>\d+)/', views.DelTradeAPIView.as_view(), name='trade_del'),
    path('cost/save/', views.CostSaveAPIView.as_view(), name='cost_save'),
    path('cost/show/', views.CostShowAPIView.as_view(), name='cost_show'),
    path('agent/save/', views.SaveAgentAPIView.as_view(), name='pc_agent_save'),
    url(r'agent/del/(?P<pk>\d+)/', views.DelAgentAPIView.as_view(), name='pc_agent_del'),
    path('sent/', views.SentAPIView.as_view(), name='sent'),
    path('return/', views.ReturnAPIView.as_view(), name='return'),
    path('agent/list/', views.ListAgentAPIView.as_view(), name='agentList'),
    url(r'list/(?P<id>\d+)/', views.ListTradeAPIView.as_view(), name='tradeList'),
    url(r'total/(?P<id>\d+)/', views.TotalTradeAPIView.as_view(), name='total'),
    path('all/', views.AllTradeAPIView.as_view(), name='all'),
    url(r'record/(?P<id>\d+)/', views.RecordAPIView.as_view(), name='Record'),
    url(r'check/(?P<id>\d+)/', views.CheckAPIView.as_view(), name='Check'),
    path('check/list/', views.CheckListAPIView.as_view(), name='CheckList'),
    path('after/query', views.WebQueryAPIView.as_view(), name='afterQuery'),
    # path('after/pb/query', views.WebPowerBankQueryAPIView.as_view(), name='afterPowerBankQuery'),
    path('after/confirm', views.AfterConfirmAPIView.as_view(), name='afterConfirm'),
]
